package name.matthewgreet.example6.model; import java.io.Serializable; import java.util.Objects; public class PublisherGamePK implements Serializable { private static final long serialVersionUID = -7209698653494032414L; public int publisherId; public int gameId; public PublisherGamePK() { // Empty } public PublisherGamePK(int publisherId, int gameId) { this.publisherId = publisherId; this.gameId = gameId; } public int getPublisherId() { return publisherId; } public void setPublisherId(int publisherId) { this.publisherId = publisherId; } public int getGameId() { return gameId; } public void setGameId(int gameId) { this.gameId = gameId; } @Override public int hashCode() { return Objects.hash(publisherId, gameId); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PublisherGamePK other = (PublisherGamePK) obj; return publisherId == other.publisherId && gameId == other.gameId; } @Override public String toString() { return "DesignerGamePK [publisherId=" + publisherId + ", gameId=" + gameId + "]"; } }